saveout() {
    TGT_DIR=/tmp
    SUMS_FILE=${TGT_DIR}/MD5SUMS
    EXE=$1
    OUT_FILE=`mktemp`
    echo "#meta: executed command: $@" > ${OUT_FILE}
    "$@" 2>&1 | tee -a ${OUT_FILE}
    sum=`/usr/bin/md5sum ${OUT_FILE}`
    filepart=`echo ${sum} | gawk -v FIELDWIDTHS="5" '{print $1}'`
    NEW_OUT_FILE="${TGT_DIR}/$(basename ${EXE})_${filepart}_$(date +%F%H%M%S)"
    mv ${OUT_FILE} ${NEW_OUT_FILE}
    echo ${sum} | sed "s#${OUT_FILE}#$(basename ${NEW_OUT_FILE})#g" >> ${SUMS_FILE}
    echo "saveout: output has been saved to ${NEW_OUT_FILE} / ${SUMS_FILE}"
}
